<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
<TITLE>IP地址查询-电脑IP地址查询-网站IP地址查询-精确IP地址查询-phpzf.com</TITLE>
<link type="image/x-icon" href="http://blog.phpzf.com/wp-content/themes/MI/images/favicon.ico" rel="icon">
<META NAME="Generator" CONTENT="ip,代理IP查询,IP地址查询">
<META NAME="Author" CONTENT="IP查询,phpzf.com">
<META NAME="Keywords" CONTENT="电脑IP地址查询,网站IP地址查询,IP地址查询,代理IP查询,phpzf.com">
<META NAME="Description" CONTENT="电脑IP地址查询,网站IP地址查询,IP地址查询,代理IP查询,phpzf.com">
<style type="text/css">
body {font-size:14px;line-height:150%;background-image: url(bg_body.jpg);background-repeat: no-repeat;}
</style>
<SCRIPT LANGUAGE="JavaScript">function checkIP(){var ipArray,ip,j;ip = document.ipform.ip.value;if(/[A-Za-z_-]/.test(ip)){if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(com\.hk)|(net\.cn)|(org\.cn)|(com\.ru)|(net\.ru)|(org\.ru)|(name)|(biz)|(hk)|(vn)|(com\.sg)|(pk)|(ph)|(ac)|(bz)|(de)|(net\.au)|(my)|(tv)|(us)|(jp)|(kr)|(sg)|(mn)|(cd)|(ue)|(sh)|(lc)|(hn)|(me)|(la)|(cc)|(tk)|(com\.tw)|(cm)|(cn))$/.test(ip)){alert("不是正确的域名,请检查域名格式或看是否有空格");	document.ipform.ip.focus();return false;}}else{ipArray = ip.split(".");j = ipArray.length;if(j!=4){alert("不是正确的IP");document.ipform.ip.focus();return false;}for(var i=0;i<4;i++){if(ipArray[i].length==0 || ipArray[i]>255){alert("不是正确的IP");document.ipform.ip.focus();return false;}}}}
google_ad_client = "pub-4658215952319917";google_ad_slot = "7496475683";google_ad_width = 468;google_ad_height = 60;
</script>
</head>
<body>
<div align="center" style="margin-top:100px">
  <p>&nbsp;</p>
  <p><a href="http://www.phpzf.com" target="_self">PHPZF--专注WEB前沿技术</a></p>
</div>
 <div class="c" align="center">
	<div>
<FORM METHOD=POST ACTION="" name="ipform" onsubmit="return checkIP();">
<p>IP地址或域名：
  <input type="text" name="ip" size="27" maxlength="100" id="url" value="<?php @$_POST['ip']?>">
<input type="submit" value="查 询" id="sub">
<INPUT TYPE="hidden" name="action" value="2">
</p>
</FORM>
<p>
<?php
error_reporting(0);
include_once('./qqwry.php');
$QQWry=new QQWry;
function get_real_ip(){
$ip=false;
if(!empty($_SERVER["HTTP_CLIENT_IP"])){
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ips = explode (", ", $_SERVER['HTTP_X_FORWARDED_FOR']);
if ($ip) { array_unshift($ips, $ip); $ip = FALSE; }
for ($i = 0; $i < count($ips); $i++) {
if (!eregi ("^(10|172\.16|192\.168)\.", $ips[$i])) {
$ip = $ips[$i];
break;}}}return $ip;
}
function is_ip($str) {
    $ip = explode(".", $str);
    if (count($ip)<4 || count($ip)>4) return 0;
    foreach($ip as $ip_addr) {
        if ( !is_numeric($ip_addr) ) return 0;
        if ( $ip_addr<0 || $ip_addr>255 ) return 0;
    }return 1;
}
if($_POST['ip']){
$ip=trim($_POST['ip']);preg_match('/((\w|-)+\.)+[a-z]{2,4}/i',$ip) ? $ip=gethostbyname($ip) : $ip;
if(is_ip($ip)){
$ifErr=$QQWry->QQWry($ip);
echo "您查询的IP:&nbsp;[<font color=#0000FF>".$ip."</font>]<br>IP详细地址:&nbsp;[<font color=#FF0000>".$QQWry->Country.$QQWry->Local."</font>]<br/>";
}else
{
echo "囧，你输入的IP,居然不能查询到!不是输入错误？";
}
}else{
$ip=get_real_ip();
if (($_SERVER["HTTP_CLIENT_IP"]) or ($_SERVER['HTTP_X_FORWARDED_FOR'])){
$ifErr=$QQWry->QQWry($ip);
echo "您的真实P是[<font color=#FF0000>".$ip."</font>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;来自".$QQWry->Country.$QQWry->Local."<br/>";
$ip=$_SERVER['REMOTE_ADDR'];
$ifErr=$QQWry->QQWry($ip);
echo "您的代理IP是[<font color=#FF0000>".$ip."</font>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;来自".$QQWry->Country.$QQWry->Local;
}
else{
$ip=$_SERVER['REMOTE_ADDR'];
$ifErr=$QQWry->QQWry($ip);
echo "您的IP地址是：[<font color=#0000FF>".$ip."</font>]&nbsp;来自：<font color=#FF0000>".$QQWry->Country.$QQWry->Local."</font>";
 }
}

?>
</p>
</div>
</div>
<div align="center" style=" margin-top:150px">
<?php base64_decode("PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIHNyYz0iaHR0cDovL3BhZ2VhZDIuZ29vZ2xlc3luZGljYXRpb24uY29tL3BhZ2VhZC9zaG93X2Fkcy5qcyI+PC9zY3JpcHQ+");?>
<p>Copyright &copy; <a href="http://phpzf.com">http://phpzf.com</a> All Rights Reserved <br>IP库更新时间2011-10-19</p>
</div>
</html>